<?php
/**
 * Description of logoutAction
 *
 * @author francisc
 */

class logoutAction extends sfAction {

    public function execute($request) {
        $this->getUser()->setAuthenticated(false);

        $this->getUser()->clearCredentials();
        $this->getUser()->getAttributeHolder()->clear();
        session_destroy();

        $this->redirect("@homepage");
    }
}
